Skip to content

Java2 Homework3 - #8

Open
Ren4t wants to merge 2 commits into
masterfrom
branch2-3
Open

Java2 Homework3#8
Ren4t wants to merge 2 commits into
masterfrom
branch2-3

Conversation

@Ren4t

@Ren4t Ren4t commented Sep 30, 2020

Copy link
Copy Markdown
Owner

No description provided.

@OKrylov OKrylov left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

В целом по ДЗ все отлично, но обратите внимание на замечания



}
void get(String name){

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

больше print, чем get. Старайтесь, чтобы имена методов соответствовали их действиям

Comment on lines +15 to +26
for (String word : words) {
count = 0;
for (String l : list) {
if(word.equals(l)){
count++;
}
}
if(count == 0){
list.add(word);
}
}
System.out.println(list.toString());

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

коллекция Set идеально подходит для такой ситуации, нам нужно просто её проинициализировать, за уникальность значений она возьмется сама

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants